﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.IBLL;
using KPIS.GERP.GIMS.IDAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;

namespace KPIS.GERP.GIMS.BLL
{
    public class PrePurchaseRequestRouteBLL : IBLLPrePurchaseRequestRoute
    {
        private static readonly IDALPrePurchaseRequestRoute dal = DataAccess.CreatePrePurchaseRequestRoute();

        public PrePurchaseRequestRouteBLL()
        {

        }

        public string Insert(PrePurchaseRequestRouteInfo info)
        {
            return dal.Insert(info);
        }

        public void Insert(IList<PrePurchaseRequestRouteInfo> ListInfo)
        {
            dal.Insert(ListInfo);
        }

        public void Insert(IList<PrePurchaseRequestRouteInfo> ListInfo, int PrePurchaseRequestSeq, int UserId, IDBManager dbManagerTrans)
        {
            dal.Insert(ListInfo, PrePurchaseRequestSeq, UserId, dbManagerTrans);
        }

        public void Update(PrePurchaseRequestRouteInfo info)
        {
            dal.Update(info);
        }

        public void DeleteAll(IList<PrePurchaseRequestRouteInfo> ListInfo, IDBManager dbManagerTrans)
        {
            dal.DeleteAll(ListInfo, dbManagerTrans);
        }

        //private void CopyToHistory(IList<PrePurchaseRequestRouteInfo> ListInfo, int UserId,IDBManager dbManagerTrans)
        //{
        //    dal.CopyToHistory(ListInfo, UserId, dbManagerTrans);
        //}

        public IList<PrePurchaseRequestRouteInfo> GetPrePurchaseRequestRoute(PrePurchaseRequestInfo InfoPpr)
        {
            return dal.GetPrePurchaseRequestRoute(InfoPpr);
        }

        public IList<PrePurchaseRequestRouteInfo> GetPrePurchaseRequestRoute(int PrePurchaseRequestSeq, IDBManager dbManagerTrans)
        {
            return dal.GetPrePurchaseRequestRoute(PrePurchaseRequestSeq, dbManagerTrans);
        }
    }
}
